    <script src="__ROOT__/public/common/js/jquery-3.2.1.min.js"></script>
    <script src="__ROOT__/public/common/js/plupload.full.min.js"></script>
    <script src="__ROOT__/public/common/wangEditor/js/wangEditor.min.js"></script>
    <script src="__ROOT__/public/Boot/js/bootstrap.min.js"></script>
    <script type="text/javascript">
    	var textarea = document.getElementById('content');
    	var editor = new wangEditor(textarea);
    	editor.config.uploadImgUrl = '{:U('Upload/uploade')}';
		editor.config.hideLinkImg = true;
   		editor.create();
		wangEditor.config.mapAk = '7dSaXT6nb7YUBVLS5NZBgTPHXT2vUuMS'; 
    </script>
    <script type="text/javascript">
            var uploader = new plupload.Uploader({
                runtimes: 'html5', //上传插件初始化选用那种方式的优先级顺序
                browse_button: 'pic_btn', // 上传按钮
                url: "{:U('Upload/uploadt')}", //远程上传地址
                multi_selection: false, //true:ctrl多文件上传, false 单文件上传
                init: {
                    FilesAdded: function(up, files) { //文件上传前
                            var li = '';
                            plupload.each(files, function(file) { //遍历文件
                                li += "<li id='" + file['id'] + "'><div class='progress'><span class='bar'></span><span class='percent'>0%</span></div></li>";
                            });
                            $("#pic_thumb").append(li);
                            uploader.start();
                    },
                    UploadProgress: function(up, file) { //上传中，显示进度条
                 	var percent = file.percent;
                        $("#" + file.id).find('.bar').css({"width": percent + "%"});
                        $("#" + file.id).find(".percent").text(percent + "%");
                    },
                    FileUploaded: function(up, file, info) { //文件上传成功的时候触发
                        var data = $.parseJSON(info.response);
                        $("#" + file.id).html("<img src='" + data.pic + "' class='img-responsive'/>" );
                        $("#thumb").html("<input name='thumb' value=" + data.pic + " type='hidden'>" );
                    },
                    Error: function(up, err) { //上传出错的时候触发
                        alert(err.message);
                    }
                }
            });
            uploader.init();
       </script>
